package Test;

import java.util.ArrayList;

import org.junit.Test;

import DBLayer.DBParent;
import ModelLayer.Parent;

public class TestDBParent
{
	DBParent dbpa = new DBParent();
	ArrayList<Parent> palist = dbpa.getAllParents(false);

	@Test
	public void testGetAllChilds() {
	    System.out.println("\nParent size : " + palist.size() + "\n");
	    int id = 1;
	    while(id <= palist.size())
		{
			Parent c = dbpa.searchParentID(id, false);
			System.out.println("ParentID    : " + c.getParentID());
			System.out.println("Workphone   : " + c.getWorkPhone());
			System.out.println("GrownupID   : " + c.getGrownupID());
			id++;
			System.out.println("-----------------------");
			System.out.println(" ");
		}
	}

	@Test
	public void testSearchParentID() {
		int id = 1;
		Parent c = dbpa.searchParentID(id, false);
		System.out.println("search Parent ID");
		System.out.println("ParentID    : " + c.getParentID());
		System.out.println("Workphone   : " + c.getWorkPhone());
		System.out.println("GrownupID   : " + c.getGrownupID());
		System.out.println(" ");
	}
/*
	@Test
	public void testInsertParent() {
		fail("Not yet implemented");
	}

	@Test
	public void testUpdateParent() {
		fail("Not yet implemented");
	}

	@Test
	public void testDelete() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetAllParents() {
		fail("Not yet implemented");
	}
*/
}
